home *** CD-ROM | disk | FTP | other *** search
/ New Perspectives on Computer Concepts / New Perspectives on Computer Concepts.iso / np2010c / l05a.swf / scripts / frame_456 / DoAction.as
Text File  |  2008-11-25  |  2KB  |  75 lines

  1. function EndLab()
  2. {
  3.    _global.percent1;
  4.    _global.percent2;
  5.    _global.filename;
  6.    _global.questionsanswered;
  7.    filename = "Local Area Networks";
  8.    var _loc2_ = new Date();
  9.    var _loc9_ = undefined;
  10.    var _loc4_ = undefined;
  11.    var _loc10_ = undefined;
  12.    _global.mydate;
  13.    var _loc3_ = undefined;
  14.    var _loc5_ = undefined;
  15.    var _loc6_ = undefined;
  16.    var _loc8_ = undefined;
  17.    var _loc7_ = undefined;
  18.    _global.mytime;
  19.    _loc9_ = _loc2_.getDate();
  20.    _loc4_ = _loc2_.getMonth();
  21.    _loc4_ += 1;
  22.    _loc10_ = _loc2_.getFullYear();
  23.    mydate = _loc4_ + "/" + _loc9_ + "/" + _loc10_;
  24.    _loc3_ = _loc2_.getHours();
  25.    _loc5_ = _loc2_.getMinutes();
  26.    if(_loc3_ >= 13)
  27.    {
  28.       _loc6_ = _loc3_ - 12;
  29.       _loc7_ = "PM";
  30.    }
  31.    else if(_loc3_ == 0)
  32.    {
  33.       _loc6_ = 12;
  34.       _loc7_ = "AM";
  35.    }
  36.    else
  37.    {
  38.       _loc6_ = _loc3_;
  39.       _loc7_ = "AM";
  40.    }
  41.    if(_loc5_ < 10)
  42.    {
  43.       _loc8_ = "0" + _loc5_;
  44.    }
  45.    else
  46.    {
  47.       _loc8_ = _loc5_;
  48.    }
  49.    mytime = _loc6_ + ":" + _loc8_ + " " + _loc7_;
  50.    if(QuizTrack.total_correct == 0 || QClen == 0)
  51.    {
  52.       percent1 = 0;
  53.    }
  54.    else
  55.    {
  56.       percent1 = QuizTrack.total_correct / QClen * 100;
  57.    }
  58.    percent1 = Math.round(percent1);
  59.    questionsanswered = QClen - QuizTrack.quest_to_ask;
  60.    if(questionsanswered == 0 || QuizTrack.total_correct == 0)
  61.    {
  62.       percent2 = 0;
  63.    }
  64.    else
  65.    {
  66.       percent2 = QuizTrack.total_correct / questionsanswered * 100;
  67.    }
  68.    percent2 = Math.round(percent2);
  69.    _global.output;
  70.    output = "MTC|" + filename + "|" + mydate + "|" + mytime + "|" + QClen + "|" + QuizTrack.total_correct + "|" + percent1 + "%|" + questionsanswered + "|" + percent2 + "%";
  71.    System.setClipboard(output);
  72. }
  73. stop();
  74. EndLab();
  75.